home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
7_10.lha
/
7_10
/
p_wait.c
< prev
next >
Wrap
Text File
|
1993-08-08
|
857b
|
32 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
include <process.h>
include <debug.h> /* DELETE */
/ pause until one of the objects
/ listed becomes available.
nt process::wait(process_object *obj0, process_object *obj1,
process_object *obj2, process_object *obj3,
process_object *obj4, process_object *obj5)
if (debug) /*DELETE*/ cerr << "process" << this << "::wait(...)\n";
if (mustrecurse())
return wait(obj0, obj1, obj2, obj3, obj4, obj5);
else
{
process_object *nwaitvec[7];
nwaitvec[0] = obj0;
nwaitvec[1] = obj1;
nwaitvec[2] = obj2;
nwaitvec[3] = obj3;
nwaitvec[4] = obj4;
nwaitvec[5] = obj5;
nwaitvec[6] = 0;
int ret = wait(nwaitvec);
if (debug) /*DELETE*/ cerr << "<<<< process" << this << "::wait(...) <- " << ret << "\n";
return ret;
}